<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
/*   Description  of this file
 *    Author king-of-war
 *    Last Modified 2009-5-6
 *    This class designed  for the *** operation
 */
 @session_start();

 $root_path='../';
  include_once $root_path . 'admin/smarty_config.php';
 include_once $root_path.'admin/class/vote.class.php';

 $vote= new vote($root_path);

/*
 *
 * check identify
 */
include_once $root_path.'admin/class/verify.class.php';
$a=new verify($root_path);
$a->identity_check(2);

// $line=$vote->vote_add(4,20,1,'選項內容',3,1);

// $line=$vote->vote_del(4,2);

/*
 * vote add function
 */
 $info='投票主题添加';
if(isset($_POST['submit'])){
	$topic=$_POST['topic'];
	$line=$vote->vote_add('',$topic,'','',1,1);
	if($line){
		$info='添加成功';
	}else{
		$info='添加失败';
	}
}



 /*
  * set template
  */
  $smarty->assign('info',$info);
 $smarty->display("vote_add.html");
?>
